//找到网页上的图画的位置，并且用echarts初始化这个区域
 var myChart = echarts.init(document.getElementById("idx1"));
 //配置绘制参数
 var option = {
    visualMap:{
        min:1,
        max:700,
        inRange:{
            color:['yellow','red']
        },
        calculable:'true',
        top:'bottom',
        left:'center',
        orient:'horizontal',
 },
     title: {
         text: '散点图---章玉景',
         left: 'center',
     },
    xAxis: {
        type:'category',
        data: ["2012","2014","2015","2016","2017","2018","2019","2020"],
    },
    yAxis: {},
    series:[{
         type:'scatter',
         data: [400,600, 700,700,100,400,400, 600,700],
         name:"产品A",
        //  value:700,
         
        },{
            type:'scatter',
            data: [400, 500,500,500,500,400,400, 500,500],
            name:"产品B",
            // value:350,
           
       },{
            type:'scatter',
            data:[400,400,300,300,300, 400,400, 400,300],
            name:"产品C",
            // value:200,
 },]
        }; 
 //画图
 myChart.setOption(option);